<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <s:set name="isNew" value="id == null"/>
    <s:set var="title">
        <s:if test="#isNew">创建</s:if><s:else>修改</s:else>代码
    </s:set>

    <title><s:property value="#title"/></title>
    <meta name="menu" content="codeManage"/>
</head>

<body>
<div class="content_block">
    <h2 class="jquery_tab_title"><s:property value="#title"/></h2>

    <form id="mainForm" action="code!save.action" method="post">
        <input type="hidden" name="id" value="${id}"/>
        <input type="hidden" name="revision" value="${revision}"/>

        <p>
            <label for="codeType.id">代码类型: </label>
            <s:if test="#isNew">
                <s:select id="codeType.id" name="codeType.id" list="codeTypeList" listKey="id"
                          listValue="shortDesc" theme="simple"/>
            </s:if>
            <s:else>
                <s:property value="codeType.shortDesc"/>
            </s:else>
        </p>

        <p>
            <label for="value">代码值: </label>
            <input id="value" name="value" type="text" value="${value}" class="input-small"/>
        </p>

        <p>
            <label for="code">代码显示值: </label>
            <input id="code" name="code" type="text" value="${code}" class="input-small"/>
        </p>
        <p>
        <label for="shortDesc">描述: </label>
        <input id="shortDesc" name="shortDesc" type="text" value="${shortDesc}" class="input-medium"/>
         </p>
        <p>
            <a class="button" href="javascript:$('#mainForm').submit()"><span>提交</span></a>
            <a class="button" onclick="window.location.href='code.action'"><span>返回</span></a>
        </p>

    </form>

</div>
</body>
</html>
